import React, { Component } from 'react';


export default class Info extends Component {
    render() {
        console.log('Info.props', this.props);
        /* 
          history: {length: 7, action: "PUSH", location: {…}, createHref: ƒ, push: ƒ, …}
             location:
             hash: ""
             key: "omooml"
             pathname: "/home/message/info"
             search: ""
             state: {id: "001", name: "小张", age: 18, say: "我是第一"}
        */
        const { name, age, say } = this.props.location.state;

        return (
            <ul>
                <li>姓名：{name}</li>
                <li>年龄:{age}</li>
                <li>说:{say}</li>
            </ul>
        )
    }
}
